﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Forms;
using System.Collections.Specialized;

namespace Titler.Controls
{
    /// <summary>
    /// Interaction logic for ThreadCtrl.xaml
    /// </summary>
    public partial class ThreadCtrl : System.Windows.Controls.UserControl
    {

        public ThreadCtrl()
        {
            InitializeComponent();
        }


        /// <summary>
        /// ADD NEW ITEM TO CONTROL LIST
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Control_Add_Item(object sender, RoutedEventArgs e)
        {
            ControlMethods.Control_Add_Item(sender);
        }


        /// <summary>
        /// CREATE TITLE FOR CTRLTHREAD
        /// </summary>
        /// <returns>THE TITLE FOR CTRLTHREAD</returns>
        public string TitleReturn()
        {
            //TOP AND BOTTOM THREAD PROFILE
            string TopProfile = Profile.Text == "BxP" ? "BOX" : Profile.Text == "BxB" ? "BOX" : "PIN";
            string BottomProfile = Profile.Text == "BxP" ? "PIN" : Profile.Text == "BxB" ? "BOX" : "PIN";

            //CREATE TITLE
            return (Diameter.Text + "-" + Weight.Text + " " + Thread.Text + " " + TopProfile + ", " +
                    Diameter.Text + "-" + Weight.Text + " " + Thread.Text + " " + BottomProfile);
            //return (Diameter.Text + "-" + Weight.Text + " " +
            //    (Dwg == true ? "" : Thread.Text + " ") + TopProfile + ", " +
            //    Diameter.Text + "-" + Weight.Text + " " +
            //    (Dwg == true ? "" : Thread.Text + " ") + BottomProfile);

        }
    }
}
